var http = require("http");
var fs = require("fs");
var server = http.createServer().listen("12345",function(){
	console.log("启动成功");
});
server.on("request",function(req,res){
	var url = req.url;
	console.log("url:"+url);
	if(url.indexOf("/public") == 0){//以public开头的静态资源放行
		fs.readFile("."+url,function(err,data){
			res.end(data);
		});
	}
});